import http from './request'

// 封装获取车票列表的 API
export const getTicketListApi = (data) => http.post('/api/trip/train', data)

// 获取车票详情的接口
export const getTicketApi = (data) =>
  http.get('/api/trip/train/' + data.id, {
    params: {
      start: data.start,
      end: data.end
    }
  })

// 车票下单
export const createOrderApi = (data) => http.post('/api/order/create', data)
